perm filename SAIL.XGP[DOC,AIL]1 blob
sn#088649 filedate 1974-03-01 generic text, type T, neo UTF8
␈↓STANFORD ARTIFICIAL INTELLIGENCE LABORATORY␈↓
-MARCH 1974
␈↓↓␈↓ ¬ SAIL USER MANUAL
␈↓␈↓ ε∀UPDATE
␈↓␈↓ ¬wJames R. Low
␈↓␈↓ ¬pHanan J. Samet
␈↓␈↓ ¬`Robert F. Sproull
␈↓␈↓ ¬ODaniel C. Swinehart
␈↓␈↓ ¬`Russell H. Taylor
␈↓␈↓ ¬bKurt A. VanLehn
␈↓␈↓ εβABSTRACT
␈↓This␈α
document␈α
describes␈α
recent␈α
changes␈α
to␈α
the␈α
SAIL␈α
language␈α
since␈α
the␈α
"new"␈α∞manual␈α
(AIM-204)
␈↓was␈α
published␈α
in␈α∞July␈α
1973.␈α
It␈α
reflects␈α∞the␈α
various␈α
new␈α
features␈α∞implemented␈α
as␈α
of␈α∞12␈α
February,
␈↓1974␈αfor␈αSAIL␈αversion␈α7␈αand␈αcorrects␈αa␈αnumber␈αof␈αminor␈αerrors␈αin␈αthe␈αearlier␈αmanual.
␈↓SAIL Addendum 1␈↓ ≡TABLE OF CONTENTS
␈↓
␈↓␈↓ βt␈↓↓T A B L E O F C O N T E N T S␈↓
␈↓␈↓ β8SECTION␈↓ ≤PAGE
␈↓␈↓ β81␈↓ ∧λINTRODUCTION␈↓ Z1
␈↓␈↓ β82␈↓ ∧λNUMERICAL ROUTINES␈↓ Z2
␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XOVERFLOW␈↓ Z3
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XENTRY POINTS␈↓ Z3
␈↓␈↓ β83␈↓ ∧λNEW PROCESS FEATURES␈↓ Z4
␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XSPROUT APPLY␈↓ Z4
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XSPROUT_DEFAULTS␈↓ Z4
␈↓␈↓ β8␈↓ ∧λ3␈↓ ∧XSUSPEND␈↓ Z6
␈↓␈↓ β8␈↓ ∧λ4␈↓ ∧XFAIL AND SUCCEED␈↓ Z6
␈↓␈↓ β84␈↓ ∧λERROR HANDLING␈↓ Z7
␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XERROR MODES␈↓ Z7
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XUSER ERROR PROCEDURES␈↓ Z7
␈↓␈↓ β85␈↓ ∧λINEXHAUSTIBLE STRING SPACE␈↓ Z9
␈↓SAIL Addendum 1␈↓ ≡TABLE OF CONTENTS
␈↓␈↓ β86␈↓ ∧λMISCELLANEOUS NEW FEATURES␈↓ L11
␈↓␈↓ β8␈↓ ∧λ1␈↓ ∧XNEW MTAPE OPTIONS␈↓ L11
␈↓␈↓ β8␈↓ ∧λ2␈↓ ∧XINITIALIZATION PHASES␈↓ L11
␈↓␈↓ β8␈↓ ∧λ3␈↓ ∧XCHNCDB␈↓ L12
␈↓␈↓ β8␈↓ ∧λ4␈↓ ∧XARRCLR␈↓ L12
␈↓␈↓ β8␈↓ ∧λ5␈↓ ∧XSETPL␈↓ L12
␈↓␈↓ β8␈↓ ∧λ6␈↓ ∧XEVALREDEFINE␈↓ L13
␈↓␈↓ β8␈↓ ∧λ7␈↓ ∧XCVPS␈↓ L13
␈↓␈↓ β8␈↓ ∧λ8␈↓ ∧XEXPRESSIONS IN REQUIRES␈↓ L13
␈↓␈↓ β8␈↓ ∧λ9␈↓ ∧XRELEASE␈↓ L13
␈↓␈↓ β8␈↓ ∧λ10␈↓ ∧XTTYUP␈↓ L13
␈↓␈↓ β8␈↓ ∧λ11␈↓ ∧XBREAKSET MODES "K" AND "F"␈↓ L14
␈↓␈↓ β8␈↓ ∧λ12␈↓ ∧XINOUT␈↓ L14
␈↓␈↓ β8␈↓ ∧λ13␈↓ ∧XGETSTS & SETSTS␈↓ L14
␈↓␈↓ β8␈↓ ∧λ14␈↓ ∧XCHANGES TO "OPEN" ERROR HANDLING␈↓ L15
␈↓␈↓ β8␈↓ ∧λ15␈↓ ∧XASH␈↓ L15
␈↓␈↓ β8␈↓ ∧λ16␈↓ ∧XARG_LIST␈↓ L15
␈↓␈↓ β87␈↓ ∧λMINOR CORRECTIONS TO AIM-204␈↓ L16
␈↓SAIL Addendum 1␈↓ uINTRODUCTION
␈↓␈↓ ¬↑␈↓↓SECTION 1␈↓
␈↓␈↓ ¬1␈↓↓INTRODUCTION␈↓
␈↓The␈αfollowing␈αshort␈αmanual␈αdescribes␈αthe␈αchanges␈αthat␈αhave␈αhappened␈αto␈αSAIL␈αsince␈αthe␈αpublishing
␈↓of␈α
the␈α
Manual␈α
in␈α
July␈α
1973.␈αIt␈α
accurately␈α
reflects␈α
the␈α
state␈α
of␈αSAIL,␈α
version␈α
7,␈α
which␈α
was␈α
put␈αup
␈↓on␈α⊃December␈α∩4,␈α⊃1973.␈α∩ The␈α⊃reader␈α⊃should␈α∩be␈α⊃warned␈α∩that␈α⊃many␈α⊃of␈α∩these␈α⊃new␈α∩features␈α⊃were
␈↓designed␈αfor␈αveteran␈αSAIL␈αhackers.
␈↓The␈αreader␈αmay␈αalso␈αwant␈αto␈αrefer␈αto␈αthe␈αfollowing␈αdocuments,␈αwhich␈αare␈αusually␈αkept␈αupdated.
␈↓MACLIE.WRU[DOC,AIL]␈↓ ∧λA␈α
summary␈α
of␈α
commonly␈αmade␈α
errors␈α
when␈α
using␈αmacros␈α
and␈α
what␈α
to␈αdo
␈↓␈↓ ∧λabout␈αthem.
␈↓TUTOR.DOC[DOC,AIL]␈↓ ∧λIn␈αintroduction␈αto␈αLEAP.
␈↓LEAP.WRU[DOC,AIL]␈↓ ∧λA␈αdetailed␈αdescription␈αof␈αthe␈αruntime␈αenvironment␈αof␈αLEAP␈αfor␈αthe␈αhardy
␈↓␈↓ ∧λfew␈αwho␈αwant␈αto␈αinterface␈αto␈αLEAP␈αin␈αassembly␈αlanguage.
␈↓SAIL.DOC[AIM,DOC]␈↓ ∧λThe␈α
July␈α
'73␈α∞manual␈α
(AIM-204)␈α
in␈α
LPT␈α∞form.␈α
Warning:␈α
this␈α
version␈α∞is␈α
the
␈↓␈↓ ∧λStanford␈α∞character␈α∞set.␈α∞ It␈α∂is␈α∞also␈α∞almost␈α∞300␈α∂pages␈α∞long.␈α∞ You␈α∞can␈α∂get␈α∞a
␈↓␈↓ ∧λ120␈α∩page␈α∩version,␈α∩set␈α∩in␈α∩two␈α∩columns␈α∩of␈α∩nice␈α∩type␈α∩from␈α∩the␈α⊃National
␈↓␈↓ ∧λTechnical␈αInformation␈αService,␈αSpringfield,␈αVirginia␈α22151.
␈↓LIES[DOC,AIL]␈↓ ∧λThis␈α∩file␈α⊃contains␈α∩the␈α⊃know␈α∩mistakes␈α⊃in␈α∩the␈α⊃Manual.␈α∩Soon␈α⊃it␈α∩will␈α⊃also
␈↓␈↓ ∧λcontain␈αthe␈αknown␈αmistakes␈αin␈αthis␈αdocument.
␈↓␈↓ εP␈↓ X␈↓␈↓ εP␈↓ X␈↓␈↓ εP␈↓ X␈↓␈↓ εI1␈↓ X
␈↓SAIL Addendum 1␈↓ ∩NUMERICAL ROUTINES
␈↓␈↓ ¬↑␈↓↓SECTION 2␈↓
␈↓␈↓ ∧i␈↓↓NUMERICAL ROUTINES␈↓
␈↓A␈α∪collection␈α∪of␈α∩numerical␈α∪routines␈α∪has␈α∪been␈α∩added␈α∪to␈α∪SAIL.␈α∩ These␈α∪are␈α∪pre-declared␈α∪in␈α∩the
␈↓compiler,␈α∪and␈α∪are␈α∪loaded␈α∪from␈α∪the␈α∩standard␈α∪SAIL␈α∪library.␈α∪ The␈α∪functions␈α∪are␈α∪quite␈α∩standard;
␈↓following␈αare␈αthe␈αequivalent␈αdefinitions:
␈↓1.␈↓ αλThe␈α⊂standard␈α⊂trigonometric␈α⊃functions.␈α⊂ ASIN,␈α⊂ACOS,␈α⊂ATAN␈α⊃and␈α⊂ATAN2␈α⊂return␈α⊃results␈α⊂in
␈↓␈↓ αλradians.␈α
The␈α
ATAN2␈αcall␈α
takes␈α
arc-tangent␈αof␈α
the␈α
quotient␈αof␈α
its␈α
arguments;␈αin␈α
this␈α
way,␈αit
␈↓␈↓ αλcorrectly␈αpreserves␈αsign␈αinformation.
␈↓ REAL PROCEDURE SIN (REAL RADIANS);
␈↓ REAL PROCEDURE COS (REAL RADIANS);
␈↓ REAL PROCEDURE SIND (REAL DEGREES);
␈↓ REAL PROCEDURE COSD (REAL DEGREES);
␈↓ REAL PROCEDURE ASIN (REAL ARGUMENT);
␈↓ REAL PROCEDURE ACOS (REAL ARGUMENT);
␈↓ REAL PROCEDURE ATAN (REAL ARGUMENT);
␈↓ REAL PROCEDURE ATAN2 (REAL NUMERATOR,DENOMINATOR);
␈↓2.␈↓ αλThe␈αhyperbolic␈αtrigonometric␈αfunctions.
␈↓ REAL PROCEDURE SINH (REAL ARGUMENT);
␈↓ REAL PROCEDURE COSH (REAL ARGUMENT);
␈↓ REAL PROCEDURE TANH (REAL ARGUMENT);
␈↓3. ␈↓ αλThe␈αsquare-root␈αfunction:
␈↓ REAL PROCEDURE SQRT (REAL ARGUMENT);
␈↓4.␈↓ αλA␈αpseudo-random␈αnumber␈αgenerator.␈α The␈αargument␈αspecifies␈αa␈αnew␈αvalue␈αfor␈αthe␈αseed␈α(If␈αthe
␈↓␈↓ αλargument␈α∩is␈α∩0,␈α∩the␈α∪old␈α∩seed␈α∩value␈α∩is␈α∩used.␈α∪ Thus␈α∩to␈α∩get␈α∩differing␈α∩random␈α∪numbers,␈α∩this
␈↓␈↓ αλargument␈αshould␈αbe␈αzero.)␈α Results␈αare␈αnormalized␈αto␈αlie␈αin␈αthe␈αrange␈α[0,1].
␈↓ REAL PROCEDURE RAN (INTEGER SEED);
␈↓␈↓ εI2␈↓ X
␈↓SAIL Addendum 1␈↓ ∩NUMERICAL ROUTINES
␈↓5.␈↓ αλLogarithm␈α⊃and␈α⊃exponentiation␈α⊃functions.␈α⊃ These␈α⊃functions␈α⊃are␈α⊃the␈α⊃same␈α⊃ones␈α⊃used␈α⊃by␈α⊂the
␈↓␈↓ αλSAIL␈α
exponentiation␈α∞operator.␈α
The␈α
base␈α∞is␈α
e␈α
(2.71828182845904).␈α∞ The␈α
logarithm␈α
to␈α∞the␈α
base
␈↓␈↓ αλ10␈αof␈αe␈αis␈α.4342944819.
␈↓ REAL PROCEDURE LOG (REAL ARGUMENT);
␈↓ REAL PROCEDURE EXP (REAL ARGUMENT);
␈↓These␈αfunctions␈αmay␈αoccasionally␈αbe␈αasked␈αto␈αcompute␈αnumbers␈αthat␈αlie␈αoutside␈αthe␈αrange␈αof␈αlegal
␈↓floating-point␈αnumbers␈αon␈αthe␈αPDP-10.␈α In␈αthese␈αcases,␈αthe␈αroutines␈αissue␈αsprightly␈αerror␈αmessages
␈↓that␈αare␈αcontinuable.
␈↓2.1␈α-␈α␈↓↓OVERFLOW␈↓
␈↓In␈α∂order␈α∂to␈α∂better␈α⊂perform␈α∂their␈α∂tasks,␈α∂these␈α∂routines␈α⊂enable␈α∂the␈α∂system␈α∂interrupt␈α⊂facility␈α∂for
␈↓floating-point␈αoverflow␈αand␈αunderflow␈αerrors.␈α If␈αan␈αunderflow␈αis␈αdetected,␈αthe␈αresults␈αare␈αset␈αto
␈↓0␈α∞(a␈α
feat␈α∞not␈α∞done␈α
by␈α∞the␈α∞PDP-10␈α
hardware,␈α∞alas).␈α∞ Be␈α
aware␈α∞that␈α∞such␈α
underflow␈α∞fixups␈α∞will␈α
be
␈↓done␈αto␈αevery␈αunderflow␈αthat␈αoccurs␈αin␈αyour␈αprogram.
␈↓If␈αyou␈αwould␈αlike␈αto␈αbe␈αinformed␈αof␈αany␈αnumerical␈αexceptions,␈αyou␈αcan␈αcall␈αthe␈αruntime:
␈↓ TRIGINI ( LOCATION(simple-procedure-name) );
␈↓Every␈α∪floating-point␈α∪exception␈α∪that␈α∪is␈α∪not␈α∪expected␈α∪by␈α∪the␈α∪interrupt␈α∪handler␈α∀(the␈α∪numerical
␈↓routines␈α∞use␈α∞a␈α∞special␈α∞convention␈α∞to␈α
indicate␈α∞that␈α∞arithmetic␈α∞exception␈α∞was␈α∞expected)␈α∞will␈α
cause
␈↓the␈α∪specified␈α∪simple␈α∩procedure␈α∪to␈α∪be␈α∪called.␈α∩ This␈α∪procedure␈α∪may␈α∩look␈α∪around␈α∪the␈α∪world␈α∩as
␈↓described␈α∞in␈α
the␈α∞Manual␈α∞for␈α
'export'␈α∞interrupt␈α∞handlers,␈α
page␈α∞79.␈α
If␈α∞no␈α∞TRIGINI␈α
call␈α∞is␈α∞done,␈α
the
␈↓interrupt␈αroutine␈αwill␈αsimply␈αdismiss␈αunexpected␈αfloating-point␈αinterrupts.
␈↓2.2␈α
-␈α
␈↓↓ENTRY␈αPOINTS␈↓
␈↓In␈αorder␈αto␈αavoid␈αconfusion␈α(by␈αthe␈αloader)␈αwith␈αolder␈αtrig␈αpackages,␈αthe␈αentry␈αpoints␈αof␈αthe␈αSAIL
␈↓arithmetic␈α
routines␈α
all␈α
have␈α
a␈α
"$"␈α
appended␈α
to␈α
the␈α
end.␈α
Thus,␈α
SIN␈α
has␈α
the␈α
entry␈α
point␈α∞SIN$,␈α
etc.
␈↓WARNING:␈αIf␈αa␈αprogram␈αplans␈αto␈αuse␈αthe␈αSAIL␈αintrinsic␈αnumerical␈αroutines,␈αit␈αshould␈αNOT␈αinclude
␈↓external␈αdeclarations␈αto␈αthem,␈αsince␈αthis␈αwill␈αprobably␈αcause␈αthe␈αFORTRAN␈αlibrary␈αroutines␈αto␈αbe
␈↓loaded.
␈↓␈↓ εI3␈↓ X
␈↓SAIL Addendum 1␈↓ λnNEW PROCESS FEATURES
␈↓␈↓ ¬↑␈↓↓SECTION 3␈↓
␈↓␈↓ ∧P␈↓↓NEW PROCESS FEATURES␈↓
␈↓3.1␈α
-␈α
␈↓↓SPROUT␈αAPPLY␈↓
␈↓The␈α<procedure␈αcall>␈αin␈αa␈αSPROUT␈αstatement␈αmay␈αbe␈αan␈αAPPLY␈αconstruct.␈α In␈α this␈αcase␈αSPROUT
␈↓will␈α∂ do␈α∂the␈α⊂"right"␈α∂thing␈α∂ about␈α∂setting␈α⊂up␈α∂the␈α∂static␈α∂link␈α⊂for␈α∂ the␈α∂APPLY.␈α∂That␈α⊂is,␈α∂"up-level"
␈↓references␈α
by␈α
the␈αprocess␈α
will␈α
be␈αmade␈α
to␈α
the␈α
same␈αvariable␈α
instances␈α
that␈αwould␈α
be␈α
used␈α
if␈αthe
␈↓APPLY␈αdid␈αnot␈αoccur␈αin␈αa␈αSPROUT␈αstatement.␈α(See␈αpage␈α77␈αof␈αthe␈αmanual.)
␈↓However,␈α
there␈α
is␈α
a␈α
glitch.␈α
The␈α
sprout␈α
mechanism␈α∞is␈α
not␈α
yet␈α
smart␈α
enough␈α
to␈α
find␈α
out␈α∞the␈α
block
␈↓of␈αthe␈α
declaration␈αof␈αthe␈α
procedure␈αused␈α
to␈αdefine␈αthe␈α
procedure␈αitem.␈α
It␈αwould␈αbe␈α
nice␈αif␈α
it␈αdid,
␈↓since␈αthen␈αit␈αcould␈αwarn␈αthe␈αuser␈αwhen␈αthat␈αblock␈αwas␈αexited␈αand␈αyet␈αthe␈αprocess␈αwas␈αstill␈αalive,
␈↓and␈α
thus␈α
potentially␈α
able␈α
to␈α
refer␈α
to␈α
deallocated␈α
arrays␈α
and␈α
etc.␈α
What␈α
the␈α
sprout␈α
does␈α∞instead␈α
is
␈↓assume␈α
the␈α
procedure␈α
was␈α
declared␈α
in␈α
the␈α
outer␈α
block.␈α
This␈α
may␈α
be␈α
fixed␈α
eventually,␈α
but␈α
in␈α
the
␈↓meantime␈α⊂ some␈α⊂extra␈α⊂care␈α⊂should␈α∂be␈α⊂taken␈α⊂ when␈α⊂using␈α⊂ apply␈α∂in␈α⊂sprouts␈α⊂to␈α⊂ avoid␈α⊂ exiting␈α∂a
␈↓block␈α∞ with␈α∞dependents.␈α∞ Similarly,␈α∞be␈α∞warned␈α∞ that␈α∞the␈α∞"DEPENDENTS␈α∞(<blockid>)"␈α∞construct
␈↓may␈α∪ not␈α∪give␈α∪ the␈α∪ "right"␈α∪result␈α∪ for␈α∩ sprout␈α∪applies.␈α∪Page␈α∪68␈α∪of␈α∪the␈α∪Manual␈α∪contains␈α∩the
␈↓description␈αof␈αthis␈αprotection␈αmechanism␈αfor␈αnon-APPLY␈αSprouts.
␈↓3.2␈α-␈α␈↓↓SPROUT_DEFAULTS␈↓
␈↓SAIL␈α
now␈α∞provides␈α
a␈α∞mechanism␈α
by␈α
which␈α∞ the␈α
user␈α∞ may␈α
specify␈α
the␈α∞"default"␈α
options␈α∞to␈α
be
␈↓used␈αwhen␈αindividual␈αprocedures␈αare␈αsprouted.
␈↓␈↓ εI4␈↓ X
␈↓SAIL Addendum 1␈↓ λnNEW PROCESS FEATURES
␈↓αSyntax:
␈↓α PROCEDURE <procid> ...
␈↓α BEGIN
␈↓α <some declarations>;
␈↓α SPROUT_DEFAULTS <integer constant>;
␈↓α <perhaps some more declarations>;
␈↓α :
␈↓α :
␈↓α <statements>
␈↓α :
␈↓α END;
␈↓In␈αother␈αwords,␈αSPROUT_DEFAULTS␈αis␈αa␈αdeclaration.
␈↓Semantics:
␈↓If␈α⊃ one␈α⊂of␈α⊃the␈α⊃"allocation"␈α⊂fields␈α⊃of␈α⊃ the␈α⊂options␈α⊃word␈α⊂passed␈α⊃to␈α⊃the␈α⊂SPROUT␈α⊃routine␈α⊃--␈α⊂i.e.
␈↓QUANTUM,STRINGSTACK,PSTACK,␈α⊃or␈α⊃ PRIORITY␈α⊃--␈α⊃is␈α⊃zero,␈α⊃ then␈α⊃ SPROUT␈α⊃ will␈α∩look␈α⊃ at
␈↓the␈αcorresponding␈α field␈αof␈α the␈αspecified␈α<integer␈αconstant>␈αfor␈αthe␈αprocedure␈αbeing␈αsprouted.␈αIf
␈↓the␈α
field␈α
is␈α
non-zero,␈α
then␈α
that␈α
value␈α
will␈α
be␈α
used;␈α
otherwise␈α
the␈α
current␈α
"system"␈αdefault
␈↓will␈αbe␈αused.
␈↓NOTE:␈α SPROUT_DEFAULTS␈α only␈αapplies␈α to␈α "allocations",␈αi.e.␈α the␈αprocess␈αstatus␈αcontrol␈αbits
␈↓(e.g.␈αSUSPME)␈αare␈αnot␈αaffected.
␈↓αExample:
␈↓α RECURSIVE PROCEDURE FOO;
␈↓α BEGIN
␈↓α SPROUT_DEFAULTS STRINGSTACK(10);
␈↓α INTEGER XXX;
␈↓α :
␈↓α :
␈↓α END;
␈↓α :
␈↓α SPROUT(P1,FOO,STRINGSTACK(3));
␈↓α SPROUT(P2,FOO);
␈↓α COMMENT P1 will have a string stack of 3*32 words.
␈↓α P2 will have a string stack of 10*32 words;
␈↓␈↓ εI5␈↓ X
␈↓SAIL Addendum 1␈↓ λnNEW PROCESS FEATURES
␈↓3.3␈α-␈α␈↓↓SUSPEND␈↓
␈↓SUSPEND␈αnow␈αbehaves␈αlike␈αRESUME␈αin␈αthat␈αit␈αreturns␈αan␈αitem.
␈↓ itm ← SUSPEND(<process item>)
␈↓Frequently,␈α∂one␈α∞is␈α∂suspending␈α∞some␈α∂other␈α∞process␈α∂than␈α∞the␈α∂one␈α∞that␈α∂is␈α∞executing␈α∂the␈α∞SUSPEND
␈↓statement.␈αIn␈αthis␈αcase,␈αthe␈αitem␈αreturned␈αis␈αANY.␈α However,␈αin␈αcases␈αlike:
␈↓ X ← SUSPEND(MYPROC);
␈↓where␈α∪the␈α∀process␈α∪suspends␈α∪itself,␈α∀it␈α∪might␈α∪happen␈α∀that␈α∪this␈α∪process␈α∀is␈α∪made␈α∪running␈α∀by␈α∪a
␈↓RESUME␈α
from␈α
another␈α
process.␈α
If␈α
so,␈α
then␈α
X␈α
receives␈α
the␈α
<return_item>␈α
that␈α
was␈α∞an␈α
argument
␈↓to␈αthe␈αRESUME.
␈↓3.4␈α∞-␈α
␈↓↓FAIL␈α∞AND␈α
SUCCEED␈↓
␈↓FAIL␈α∂and␈α∂SUCCEED␈α∂now␈α∂behave␈α∂like␈α∂RESUME␈α∞and␈α∂SUSPEND␈α∂in␈α∂that␈α∂they␈α∂also␈α∂return␈α∂an␈α∞item.
␈↓The␈α
item␈αreturned␈α
is␈α
ANY␈αunless␈α
the␈α
Matching␈αProcedure␈α
containing␈α
the␈αFAIL␈α
or␈α
SUCCEED␈αwas
␈↓(1)␈α
sprouted␈α
as␈α∞a␈α
process,␈α
and␈α∞(2)␈α
made␈α
running␈α
by␈α∞a␈α
RESUME␈α
construct.␈α∞ In␈α
the␈α
latter␈α∞case,␈α
the
␈↓item␈α
returned␈α∞is␈α
the␈α∞<return_item>␈α
that␈α∞was␈α
an␈α∞argument␈α
to␈α∞the␈α
RESUME.␈α∞ [Note␈α
that␈α∞the␈α
only
␈↓case␈αin␈αwhich␈αa␈αMatching␈αProcedure␈αcan␈αbe␈αreactivated␈αat␈αa␈αFAIL␈αis␈αby␈αbeing␈αRESUMEd.]
␈↓␈↓ εI6␈↓ X
␈↓SAIL Addendum 1␈↓ XERROR HANDLING
␈↓␈↓ ¬↑␈↓↓SECTION 4␈↓
␈↓␈↓ ¬_␈↓↓ERROR HANDLING␈↓
␈↓4.1␈α
-␈α
␈↓↓ERROR␈αMODES␈↓
␈↓SAIL's␈αerror␈α handler␈αhas␈αat␈α long␈αlast␈αbeen␈α modified␈αto␈αdo␈α what␈αis␈αclaimed␈αit␈αwill␈αdo␈α in␈αSection
␈↓20␈αof␈αthe␈αmanual␈α(pgs␈α95␈α-␈α97),␈αand␈αin␈αthe␈αdescription␈αof␈αUSERERR␈α(pg␈α42).␈α In␈αbrief,␈αit␈αallows␈αone
␈↓to␈α have␈αerror␈α messages␈αautomatically␈α sent␈α to␈α a␈α"log"␈α file␈α while␈αone␈α is␈αcompiling,␈αand␈αto␈αuse
␈↓USERERR␈αas␈αa␈αtrace␈αstatement.
␈↓The␈αdescription␈αgiven␈αin␈αthe␈α
manual␈αdiffers␈αfrom␈αreality␈αin␈α
two␈αways:␈α"Keep"␈αmode␈αhas␈α
not␈α been
␈↓implemented␈α(the␈αerror␈αhandler␈α will␈αflush␈αall␈αtype-ahead␈αexcept␈αa␈α<lf>);␈α all␈αof␈αthe␈α other␈αmodes
␈↓("Quiet",␈α "Logging",␈αand␈α"Numbers")␈αare␈αimplemented␈αONLY␈α IN␈αTHE␈αCOMPILER.␈α However,␈αone
␈↓can␈α⊂get␈α∂the␈α⊂effect␈α⊂of␈α∂error␈α⊂modes␈α⊂at␈α∂runtime␈α⊂by␈α⊂using␈α∂a␈α⊂brand␈α⊂new␈α∂feature␈α⊂called␈α⊂user␈α∂error
␈↓procedures.
␈↓4.2␈α∞-␈α
␈↓↓USER␈α∞ERROR␈α
PROCEDURES␈↓
␈↓A␈α user␈αerror␈α procedure␈αis␈αa␈α user␈αprocedure␈α that␈αis␈αrun␈α before␈αor␈αinstead␈αof␈α the␈α SAIL␈αerror
␈↓handler␈α⊂ everytime␈α⊂ an␈α⊃error␈α⊂ occurs␈α⊂ at␈α⊃runtime.␈α⊂ This␈α⊂ includes␈α⊃all␈α⊂array␈α⊂errors,␈α⊃IO␈α⊂ errors,
␈↓Leapish␈α∞errors␈α
and␈α∞all␈α
USERERRs.␈α∞ It␈α
does␈α∞not␈α
include␈α∞system␈α
errors,␈α∞such␈α
as␈α∞Ill␈α
Mem␈α∞Ref␈α∞or␈α
Ill
␈↓UUO.
␈↓The␈α procedure␈αone␈αuses␈α for␈αa␈α user␈αerror␈αprocedure␈α must␈αbe␈α of␈αthe␈αfollowing␈αtype:
␈↓␈↓ α{SIMPLE INTEGER PROCEDURE proc (INTEGER loc; STRING msg, rsp);
␈↓Only␈α∞the␈α∞names␈α∞ proc,␈α∞loc,␈α∞ msg,␈α∞and␈α∞rsp␈α∞ may␈α∞vary␈α∞ from␈α∞the␈α∞ example␈α∞above,␈α∞except␈α∞ that␈α∞one
␈↓may␈αdeclare␈α the␈αprocedure␈α INTERNAL␈αif␈α one␈αwishes␈αto␈αuse␈αit␈αacross␈αfiles.
␈↓Whenever␈α the␈α
external␈αinteger␈α
_ERRP_␈α is␈αloaded␈α
with␈αLOCATION(proc),␈α
the␈αerror␈α
handler␈αwill
␈↓␈↓ εI7␈↓ X
␈↓SAIL Addendum 1␈↓ XERROR HANDLING
␈↓call␈α
proc␈α∞before␈α
it␈α
does␈α∞anything␈α
else.␈α
It␈α∞will␈α
set␈α∞loc␈α
to␈α
the␈α∞core␈α
location␈α
of␈α∞the␈α
call␈α∞ to␈α
the
␈↓error␈α∞handler.␈α∞ Msg␈α∞ will␈α∞be␈α∞ the␈α∞message␈α∞ that␈α∞it␈α∞ would␈α∞have␈α∞ printed.␈α∞ Rsp␈α∞will␈α∂be␈α∞non-NULL
␈↓only␈αif␈αthe␈αerror␈αwas␈αfrom␈αa␈αUSERERR␈αwhich␈αhad␈αresponse␈αstring␈αargument.␈α Proc␈αcan␈αdo␈αanything
␈↓that␈α⊂ a␈α∂simple␈α⊂procedure␈α∂can␈α⊂do.␈α∂ When␈α⊂it␈α∂exits,␈α⊂it␈α∂should␈α⊂ return␈α∂an␈α⊂ integer␈α∂which␈α⊂ tells␈α∂the
␈↓error␈αhandler␈α if␈α it␈αshould␈αdo␈αanything␈αmore.␈α If␈αthe␈αinteger␈αis␈α0,␈αthe␈αerror␈αhandler␈αwill␈α(1)␈α print
␈↓the␈α message,␈α(2)␈α print␈αthe␈αlocation,␈αand␈α(3)␈αquery␈αthe␈αtty␈αand␈αdispatch␈αon␈αthe␈αresponse␈αcharacter
␈↓(i.e␈αask␈αfor␈αa␈α<cr>,␈α<lf>,␈αetc.).␈α If␈αthe␈αright␈αhalf␈αof␈αthe␈αinteger␈αis␈αnon-zero,␈αit␈αis␈αtaken␈αas␈αthe␈αascii
␈↓for␈α
a␈α
character␈αto␈α
dispatch␈α
upon.␈α
The␈αleft␈α
half␈α
may␈αhave␈α
two␈α
bits␈α
to␈αcontrol␈α
printing.␈α
If␈α
bit␈α17
␈↓in␈α∂the␈α∂integer␈α∞is␈α∂on,␈α∂message␈α∂printing␈α∞is␈α∂inhibited.␈α∂ If␈α∞bit␈α∂16␈α∂is␈α∂on,␈α∞then␈α∂the␈α∂location␈α∂printing␈α∞is
␈↓inhibited.␈α⊃For␈α⊃example,␈α⊃"X"+(1␈α⊃LSH␈α⊂18)␈α⊃will␈α⊃cause␈α⊃the␈α⊃location␈α⊂to␈α⊃be␈α⊃printed␈α⊃and␈α⊃the␈α⊂program
␈↓exited.␈α"C"+(3␈αLSH␈α18)␈αwill␈αcause␈αthe␈αerror␈αhandler␈αto␈αcontinue␈αwithout␈αprinting␈αanything.
␈↓Note␈α∞that␈α∞simple␈α∞ procedures␈α∞can␈α
not␈α∞do␈α∞ a␈α∞non-local␈α∞GOTO.␈α
However,␈α∞the␈α∞ effect␈α∞of␈α∞ a␈α
non-
␈↓local␈α∪ GOTO␈α∩ can␈α∪be␈α∩ achieved␈α∪in␈α∩ a␈α∪ user␈α∩error␈α∪procedure␈α∩by␈α∪loading␈α∩the␈α∪external␈α∩integer
␈↓_ERRJ_␈αwith␈αthe␈αLOCATION␈αof␈αa␈αlabel.␈αThe␈αlabel␈αshould␈αbe␈αa␈αon␈αa␈αcall␈αto␈αa␈αnon-simple␈αprocedure
␈↓which␈αdoes␈α
the␈αdesired␈α
GOTO.␈α The␈α
error␈αhandler␈αclears␈α
_ERRJ_␈αbefore␈α
calling␈αthe␈α
procedure␈αin
␈↓_ERRP_.␈α If␈α_ERRJ_␈α is␈αnon-zero␈αwhen␈α
the␈α user␈αprocedure␈αreturns,␈αand␈αcontinuing␈α
was␈αspecified,
␈↓then␈αthe␈αerror␈αhandler's␈αexit␈α consists␈αof␈αa␈αsimple␈αtransfer␈αto␈α that␈αlocation.
␈↓WARNING!␈α⊂Handling␈α⊂errors␈α⊂from␈α⊂strange␈α⊂places␈α⊂like␈α⊂the␈α⊂string␈α⊂garbage␈α⊂collector␈α⊂and␈α⊃the␈α⊂core
␈↓management␈αroutines␈αwill␈αget␈αyou␈αinto␈αdeep␈αtrouble.
␈↓␈↓ εI8␈↓ X
␈↓SAIL Addendum 1␈↓ λ INEXHAUSTIBLE STRING SPACE
␈↓␈↓ ¬↑␈↓↓SECTION 5␈↓
␈↓␈↓ ∧⊂␈↓↓INEXHAUSTIBLE STRING SPACE␈↓
␈↓The␈αstring␈αgarbage␈αcollector␈αhas␈αbeen␈αmodified␈αto␈αexpand␈αstring␈αspace␈α(using␈αdiscontiguous␈αblocks)
␈↓whenever␈α
necessary␈α
to␈α
satisfy␈α
the␈α
demand␈α
for␈α∞places␈α
to␈α
put␈α
strings.␈α
To␈α
take␈α
advantage␈α∞ of␈α
this
␈↓feature,␈α one␈αneed␈αnot␈αchange␈αhis␈αprograms.
␈↓Here␈αare␈αsome␈αpoints␈αwhich␈αmight␈αbe␈αof␈αinterest,␈αhowever:
␈↓1)␈↓ αλAlthough␈α⊃ we␈α⊃ are␈α∩ going␈α⊃ to␈α⊃ provide␈α⊃ user␈α∩control␈α⊃over␈α⊃all␈α⊃size␈α∩parameters␈α⊃eventually,
␈↓␈↓ αλcurrently␈α∃only␈α∃ the␈α∃ initial␈α∃ string␈α∃ space␈α∃size␈α∃ is␈α∃ settable␈α∃ by␈α∃ the␈α∃ user,␈α⊗either␈α∃via
␈↓␈↓ αλREQUIRE␈α
or␈α
the␈α
ALLOC␈α
sequence,␈α
as␈α
before.␈α
The␈α
size␈α
of␈α
each␈α
string␈α
space␈α
increment␈αwill
␈↓␈↓ αλbe␈α
the␈α
same␈α
as␈α
the␈α
original␈α
size,␈α
which␈α
need␈α
not␈α
be␈α
monstrous␈α
any␈α
more␈α
unless␈α∞you␈α
know
␈↓␈↓ αλthat␈α∃all␈α∃runs␈α∃of␈α∃your␈α∃program␈α⊗will␈α∃ need␈α∃ a␈α∃monstrous␈α∃ string␈α∃ space␈α⊗ anyhow.␈α∃ The
␈↓␈↓ αλthreshold␈α
(see␈α∞below)␈α
for␈α
expanding␈α∞will␈α
be␈α
set␈α∞at␈α
1/8␈α
the␈α∞ string␈α
space␈α∞ size␈α
(increment
␈↓␈↓ αλsize).
␈↓2)␈↓ αλOne␈α∩can,␈α∩in␈α∩his␈α∩program,␈α∩modify␈α∩these␈α∩values␈α∩independently,␈α∩if␈α∩he␈α∩is␈α∩willing␈α∩to␈α∩use␈α∩the
␈↓␈↓ αλUSERCON␈αfunction,␈αand␈αto␈αfollow␈αthis␈αformat:
␈↓β USER TABLE ENTRY NAME VALUE
␈↓β STINCR lh: number of chars. in increment
␈↓β rh: number of words in increment + 4
␈↓β STREQD lh: number of chars. in threshold
␈↓β rh: number of words in threshold.
␈↓3)␈↓ αλThe␈αthreshold.␈α After␈αgarbage␈αcollection,␈αlet␈αus␈αsay␈αthat␈αM-1␈αdiscontiguous␈αstring␈αspaces␈α are
␈↓␈↓ αλfull,␈α
and␈α the␈α
M'th␈α
has␈α n␈α
free␈α characters␈α
in␈α
it␈α(available␈α
for␈αnew␈α
strings).␈α
The␈α garbage
␈↓␈↓ αλcollector␈α was␈α called␈αbecause␈α some␈αroutine␈αwanted␈αto␈αcreate␈αa␈αstring␈αR␈αcharacters␈αlong,␈αand
␈↓␈↓ αλthere␈α
were␈α
not␈αthat␈α
many␈α
available␈α(free).␈α
After␈α
garbage␈αcollection,␈α
the␈α
new␈αalgorithm
␈↓␈↓ αλrequires␈α
that␈α
N␈α
be␈α
greater␈α
than␈α
R+LH(STREQD).␈α If␈α
it␈α
is␈α
not,␈α
expansion␈α
takes␈α
place␈α
(to␈αM+1
␈↓␈↓ αλspaces),␈α∞to␈α∞ satisfy␈α
this␈α∞requirement.␈α∞ In␈α∞other␈α
words,␈α∞if␈α∞STREQD␈α∞is␈α
1/8␈α∞the␈α∞size␈α∞of␈α
the
␈↓␈↓ αλcurrent␈α⊃space,␈α⊂that␈α⊃space␈α⊂will␈α⊃not␈α⊃be␈α⊂ allowed␈α⊃ to␈α⊂become␈α⊃ more␈α⊂ than␈α⊃ about␈α⊃ 7/8␈α⊂ full.
␈↓␈↓ αλThis␈αhelps␈αavoid␈α
frequent,␈αnearly␈αuseless␈α
calls␈αon␈αthe␈αgarbage␈α
collector␈αwhen␈α space␈α
is␈αabout
␈↓␈↓ αλgone.␈α All␈αbut␈αthe␈αcurrent␈αspace␈αare␈αallowed␈αto␈αbecome␈αas␈αfull␈αas␈αpossible,␈αhowever.
␈↓␈↓ εI9␈↓ X
␈↓SAIL Addendum 1␈↓ λ INEXHAUSTIBLE STRING SPACE
␈↓4)␈↓ αλNew␈α∞statistics␈α∞are␈α∞maintained␈α∞by␈α∞the␈α∞ garbage␈α∞ collector.␈α∞ Soon␈α∞there␈α∞ will␈α∞ be␈α∂a␈α∞built-in
␈↓␈↓ αλroutine␈α∪you␈α∪can␈α∩use␈α∪to␈α∪print␈α∩them.␈α∪ For␈α∪now,␈α∩you␈α∪may␈α∪look␈α∩at␈α∪them␈α∪using␈α∩USERCON,
␈↓␈↓ αλalthough␈α
this␈α∞ document␈α
does␈α∞not␈α
say␈α∞ what␈α
they␈α
are.␈α∞ In␈α
order␈α∞to␈α
activate␈α∞timing␈α
of
␈↓␈↓ αλthe␈αgarbage␈αcollector␈α(slows␈αit␈αdown),␈αset␈αSGCTIME␈αin␈αthe␈α user␈α table␈αto␈α-1.
␈↓5)␈↓ αλFuture␈α∂plans.␈α∂ The␈α∂ new␈α∂ structure␈α∂ not␈α∂only␈α∂allows␈α∂expansion␈α∂of␈α∂string␈α∂space,␈α∂it␈α∂also␈α∞will
␈↓␈↓ αλallow␈α
for␈α
partial␈α
garbage␈α
collections␈α (no␈α
visible␈α
benefits␈α
except␈α
increased␈α
speed,␈αsince
␈↓␈↓ αλa␈αpartial␈αcollection␈αwill␈αbe␈αalmost␈αas␈αeffective␈αas␈αa␈αcomplete␈αone,␈αand␈α much␈α faster),␈α and␈αthe
␈↓␈↓ αλability␈α∂ to␈α∂ move␈α∂ string␈α⊂ space␈α∂ blocks,␈α∂in␈α∂order␈α∂to␈α⊂compact␈α∂memory.␈α∂ Push␈α∂on␈α⊂your␈α∂local
␈↓␈↓ αλrepresentative␈α to␈α get␈α these␈α things␈αdone.
␈↓␈↓ εB10␈↓ X
␈↓SAIL Addendum 1␈↓ π{MISCELLANEOUS NEW FEATURES
␈↓␈↓ ¬↑␈↓↓SECTION 6␈↓
␈↓␈↓ ∧␈↓↓MISCELLANEOUS NEW FEATURES␈↓
␈↓6.1␈α∞-␈α
␈↓↓NEW␈α∞MTAPE␈α
OPTIONS␈↓
␈↓ MTAPE(chan,NULL)
␈↓will␈αcause␈αan␈αMTAPE␈α0␈αto␈αbe␈αissued␈αfor␈αchannel␈αchan.␈α For␈αmag.␈αtapes,␈αthis␈αwill␈αcause␈αyou␈αto␈αwait
␈↓until␈α∞all␈α∞activity␈α
ceases.␈α∞ For␈α∞other␈α∞devices,␈α
various␈α∞random␈α∞things␈α
can␈α∞happen,␈α∞depending␈α∞on␈α
the
␈↓device␈αand␈αsystem.
␈↓In␈α∂export␈α⊂SAIL,␈α∂MTAPE(chnl,"I")␈α∂sets␈α⊂the␈α∂'IBM␈α∂compatible'␈α⊂mode␈α∂for␈α∂a␈α⊂tape␈α∂drive.␈α∂ (It␈α⊂does␈α∂an
␈↓MTAPE␈αchnl,101.)
␈↓6.2␈α
-␈α
␈↓↓INITIALIZATION␈αPHASES␈↓
␈↓User␈α
initializations␈α
are␈α
now␈αdone␈α
in␈α
successive␈α
phases,␈αwith␈α
all␈α
initializations␈α
required␈α for
␈↓one␈α phase␈α being␈α done␈α before␈αinitializations␈αrequired␈αfor␈αthe␈αnext␈αphase.
␈↓Syntax:
␈↓ REQUIRE <procid> INITIALIZATION;
␈↓ REQUIRE <procid> INITIALIZATION [<phase no>];
␈↓where <phase no> is an integer constant.
␈↓Semantics:
␈↓<phase␈αno>␈αspecifies␈α the␈αnumber␈α of␈αthe␈αuser␈α initialization␈αphase.␈α If␈α it␈αis␈αleft␈αout,␈α then␈αone␈αis
␈↓used.␈α Currently,␈αthere␈αare␈αthree␈α phases,␈αnumbered␈α0,␈α1,␈αand␈α 2.␈α If␈αthe␈α demand␈αis␈αgreat␈αenough,
␈↓additional␈α⊃phases␈α⊂may␈α⊃ be␈α⊂added␈α⊃later.␈α⊃ (Note␈α⊂for␈α⊃assembly␈α⊂ language␈α⊃hackers:␈α⊃internally,␈α⊂user
␈↓phases␈αare␈αnumbered␈α'400000,␈α'400001,␈αetc.)
␈↓␈↓ εB11␈↓ X
␈↓SAIL Addendum 1␈↓ π{MISCELLANEOUS NEW FEATURES
␈↓6.3␈α-␈α␈↓↓CHNCDB␈↓
␈↓ val←CHNCDB(channel)
␈↓This␈α∂integer␈α∂procedure␈α∂returns␈α⊂a␈α∂pointer␈α∂to␈α∂the␈α∂three␈α⊂word␈α∂block␈α∂used␈α∂to␈α∂open␈α⊂the␈α∂ specified
␈↓channel.␈α∞ It␈α∞is␈α∞provided␈α∞ for␈α∞the␈α∞benefit␈α∞ of␈α∞assembly␈α∞language␈α∞procedures␈α∞that␈α∞may␈α∞want␈α∞to␈α
do
␈↓I/O␈αinside␈αsome␈αfast␈αinner␈αloop,␈αbut␈αwhich␈αmay␈αwant␈αto␈αlive␈αin␈αa␈αSAIL␈αcore␈αimage␈α&␈αuse␈αthe␈αSAIL
␈↓OPEN,␈αetc.
␈↓6.4␈α-␈α␈↓↓ARRCLR␈↓
␈↓ ARRCLR(arry)
␈↓This␈αnew␈αruntime␈αroutine␈αclears␈αany␈αkind␈αof␈αarray.␈αThat␈αis,␈αarthmetic␈αarrays␈αget␈αfilled␈αwith␈αzeros,
␈↓string␈α∞arrays␈α∂with␈α∞NULLs,␈α∞and␈α∂itemvar␈α∞arrays␈α∞with␈α∂ANYs.␈α∞ One␈α∞may␈α∂use␈α∞ARRCLR␈α∞with␈α∂set␈α∞and
␈↓list␈α⊂arrays,␈α⊂but␈α∂the␈α⊂set␈α⊂and␈α⊂list␈α∂space␈α⊂will␈α⊂be␈α∂lost␈α⊂(i.e.␈α⊂un-garbage-collectable).␈α⊂The␈α∂alternative
␈↓form:
␈↓ ARRCLR(arry,val)
␈↓where␈αval␈α
is␈αeither␈α
an␈αinteger␈αor␈α
a␈αreal␈α
number,␈αwill␈αfill␈α
arry␈αwith␈α
that␈αvalue.␈α Do␈α
not␈αdo␈α
this␈αto
␈↓string␈α∞or␈α∞list␈α∞arrays␈α∞unless␈α∞you␈α∞do␈α∞not␈α
care␈α∞whether␈α∞or␈α∞not␈α∞your␈α∞program␈α∞works.␈α∞ Also␈α∞using␈α
a
␈↓real␈α
val␈α
for␈α
an␈α
itemvar␈α
array␈α
is␈α
apt␈α
to␈α∞cause␈α
strange␈α
results.␈α
(If␈α
you␈α
use␈α
an␈α
integer,␈α
arry␈α∞will␈α
be
␈↓filled␈αwith␈αCVI(val).)
␈↓6.5␈α-␈α␈↓↓SETPL␈↓
␈↓ SETPL(channel, @linnum, @pagnum, @sosnum)
␈↓This␈α∃new␈α⊗runtime␈α∃routine␈α⊗allows␈α∃one␈α⊗to␈α∃keep␈α∃track␈α⊗of␈α∃the␈α⊗string␈α∃input␈α⊗from␈α∃CHANNEL.
␈↓Whenever␈α∃a␈α∃'12␈α∃is␈α∃encountered,␈α⊗LINNUM␈α∃is␈α∃incremented.␈α∃ Whenever␈α∃a␈α∃'14␈α⊗is␈α∃encountered,
␈↓PAGNUM␈α
is␈αincremented,␈α
and␈α
LINNUM␈αis␈α
zeroed.␈α Whenever␈α
an␈α
SOS␈αline␈α
number␈α
is␈αencountered,
␈↓it␈α
is␈α
placed␈α
into␈α∞SOSNUM.␈α
When␈α
fully␈α
implemented␈α
(soon),␈α∞this␈α
will␈α
work␈α
on␈α
the␈α∞INPUT,␈α
INTIN,
␈↓and␈αREALIN␈αfunctions␈αas␈αwell.
␈↓␈↓ εB12␈↓ X
␈↓SAIL Addendum 1␈↓ π{MISCELLANEOUS NEW FEATURES
␈↓6.6␈α-␈α␈↓↓EVALREDEFINE␈↓
␈↓EVALREDEFINE␈α⊃bears␈α⊂the␈α⊃same␈α⊂relationship␈α⊃to␈α⊂REDEFINE␈α⊃as␈α⊂EVALDEFINE␈α⊃does␈α⊃to␈α⊂DEFINE.
␈↓See␈αpages␈α47␈αand␈α50␈αof␈αthe␈αManual.
␈↓6.7␈α-␈α␈↓↓CVPS␈↓
␈↓CVPS(<macro_parameter>)␈α∂converts␈α∂<macro_parameter>␈α∂to␈α∂a␈α∂string␈α∂and␈α∂returns␈α∂the␈α∂string.␈α∞See
␈↓about␈αmacro␈αparameters␈αon␈αpage␈α48␈αof␈αthe␈αmanual.
␈↓6.8␈α∞-␈α
␈↓↓EXPRESSIONS␈α∞IN␈α
REQUIRES␈↓
␈↓Previously,␈αall␈αREQUIRE␈αconstructs␈αhad␈αto␈αhave␈αonly␈αconstants␈αin␈αthem.␈αNow␈αSAIL␈αallows␈αcompile
␈↓time␈αexpressions␈αas␈αwell.␈αSee␈αabout␈αcompile␈αtime␈αexpressions␈αon␈αpage␈α47␈αof␈αthe␈αManual.
␈↓6.9␈α-␈α␈↓↓RELEASE␈↓
␈↓RELEASE␈αnow␈αtakes␈αan␈αoptional␈αsecond␈αargument,␈αthe␈αCLOSE␈αinhibit␈αbits.␈α These␈αare␈αdescribed␈αin
␈↓the␈α∞UUO␈α∞manual␈α∞(Stanford␈α∞System).␈α
These␈α∞are␈α∞defaulted␈α∞to␈α∞zero␈α
when␈α∞not␈α∞specified␈α∞so␈α∞that␈α
old
␈↓programs␈αwhich␈αdid␈αnot␈αspecify␈αthem␈αwill␈αwork␈αas␈αbefore.
␈↓6.10␈α-␈α␈↓↓TTYUP␈↓
␈↓ oldval←TTYUP(newval)
␈↓This␈αroutine␈αcasuse␈αconversion␈αof␈αlower␈αcase␈αcharacters␈α(a-z)␈αto␈αtheir␈αupper␈αcase␈αequivalents␈αfor
␈↓strings␈α⊂read␈α∂by␈α⊂any␈α⊂of␈α∂the␈α⊂SAIL␈α⊂teletype␈α∂routines␈α⊂that␈α⊂do␈α∂not␈α⊂use␈α⊂break␈α∂tables.␈α⊂ If␈α⊂newval␈α∂is
␈↓TRUE,␈αthen␈αconversion␈αwill␈αtake␈αplace␈αon␈αall␈αsubsequent␈αinputs␈αuntil␈αTTYUP␈αis␈αcalled␈αwith␈αnewval
␈↓FALSE.␈α∞ Oldval␈α
will␈α∞always␈α
get␈α∞set␈α
to␈α∞the␈α
value␈α∞of␈α
newval␈α∞used␈α
in␈α∞the␈α
previous␈α∞call.␈α∞(If␈α
TTYUP
␈↓␈↓ εB13␈↓ X
␈↓SAIL Addendum 1␈↓ π{MISCELLANEOUS NEW FEATURES
␈↓has␈α⊃never␈α⊃been␈α⊃called,␈α⊃then␈α⊂no␈α⊃conversions␈α⊃will␈α⊃take␈α⊃place,␈α⊂and␈α⊃the␈α⊃first␈α⊃call␈α⊃to␈α⊃TTYUP␈α⊂will
␈↓return␈αFALSE).
␈↓6.11␈α∞-␈α∂␈↓↓BREAKSET␈α∞MODES␈α∞"K"␈α∂AND␈α∞"F"␈↓
␈↓A␈α∞"K"␈α∞specification␈α∞as␈α∞a␈α∞BREAKSET␈α∞mode␈α
will␈α∞cause␈α∞lower␈α∞to␈α∞upper␈α∞case␈α∞conversion␈α∞when␈α
that
␈↓break␈α⊂table␈α∂is␈α⊂used.␈α∂ Conversion␈α⊂takes␈α⊂place␈α∂before␈α⊂each␈α∂character␈α⊂is␈α∂checked␈α⊂for␈α⊂breaking␈α∂or
␈↓omission.␈α An␈α"F"␈αspecification␈αturns␈αoff␈αthe␈αconversion␈α--␈αi.e.␈αit␈αundoes␈αthe␈αeffects␈αof␈α"K".
␈↓6.12␈α-␈α␈↓↓INOUT␈↓
␈↓ INOUT(inchan,outchan,howmany)
␈↓INOUT␈αreads␈αhowmany␈αwords␈αfrom␈αchannel␈αinchan␈αand␈αwrites␈αthem␈αout␈αon␈αchannel␈αoutchan.␈α Each
␈↓channel␈α∂must␈α∂be␈α∂open␈α∞in␈α∂a␈α∂mode␈α∂between␈α∂8␈α∞and␈α∂12.␈α∂ on␈α∂return,␈α∞the␈α∂EOF␈α∂variables␈α∂for␈α∂the␈α∞two
␈↓channels␈α∂will␈α∂be␈α∞the␈α∂same␈α∂as␈α∞if␈α∂ARRYIN␈α∂&␈α∂ARRYOUT␈α∞had␈α∂been␈α∂used.␈α∞ If␈α∂howmany␈α∂is␈α∂less␈α∞than
␈↓zero,␈αthen␈αtransfer␈αof␈αdata␈αwill␈αcease␈αonly␈αupon␈αend␈αof␈αfile␈αor␈αa␈αdevice␈αerror.
␈↓(note:␈αINOUT␈αuses␈αBLTs␈αto␈αtransfer␈αdata␈αdirectly␈αfrom␈αone␈αset␈αof␈αbuffers␈αto␈αthe␈αother)
␈↓6.13␈α∞-␈α
␈↓↓GETSTS␈α∞&␈α
SETSTS␈↓
␈↓ SETSTS(chan,new_status)
␈↓issues a SETSTS uuo on channel chan with the status value new_status.
␈↓ status←GETSTS(chan)
␈↓returns␈αthe␈αresults␈αof␈αa␈αGETSTS␈αuuo␈αon␈αchannel␈αchan.
␈↓␈↓ εB14␈↓ X
␈↓SAIL Addendum 1␈↓ π{MISCELLANEOUS NEW FEATURES
␈↓6.14␈α∞-␈α∂␈↓↓CHANGES␈α∞TO␈α∞"OPEN"␈α∂ERROR␈α∞HANDLING␈↓
␈↓If␈αthe␈αEOF␈αvariable␈αsupplied␈αto␈αOPEN␈αis␈αnon-zero␈αand␈αthe␈αdevice␈αname␈αis␈αinvalid,␈αthen␈αOPEN␈αwill
␈↓fail␈αwithout␈αgiving␈αthe␈αerror␈αmessage␈α
"INVALID␈αDEVICE␈αNAME␈αFOR␈αOPEN",␈αand␈αthe␈α
EOF␈αvalue
␈↓will␈α
be␈α
unchanged.␈α
If␈αa␈α
device␈α
is␈α
unavailable,␈αand␈α
EOF=0,␈α
then␈α
the␈αuser␈α
is␈α
now␈α
given␈α
the␈αoptions
␈↓of␈α∞trying␈α∞again␈α∞or␈α∞going␈α∞on␈α∞without␈α∞opening␈α∂the␈α∞device,␈α∞in␈α∞which␈α∞case␈α∞EOF␈α∞will␈α∞be␈α∞set␈α∂to␈α∞non-
␈↓zero␈αas␈αusual.
␈↓6.15␈α-␈α␈↓↓ASH␈↓
␈↓ASH␈α∪has␈α∩been␈α∪added␈α∩as␈α∪an␈α∪arithmetic␈α∩operator.␈α∪ Its␈α∩syntax␈α∪is␈α∪just␈α∩like␈α∪that␈α∩of␈α∪LSH,␈α∪and␈α∩it
␈↓generates␈αsimilar␈αcode␈α(except␈αfor␈αputting␈αout␈αa␈αPDP-10␈αASH␈αinstruction␈αinstead␈αof␈αa␈αLSH).
␈↓6.16␈α-␈α␈↓↓ARG_LIST␈↓
␈↓ ARG_LIST(<arg1>,...,<argn>)
␈↓where␈α∂each␈α⊂<arg>␈α∂may␈α∂be␈α⊂any␈α∂valid␈α∂argument␈α⊂to␈α∂the␈α∂REF_ITEM␈α⊂construct,␈α∂assembles␈α∂a␈α⊂list␈α∂of
␈↓"temporary"␈α
reference␈α
items␈α
that␈α∞will␈α
be␈α
deleted␈α
by␈α∞APPLY␈α
after␈α
the␈α
applied␈α∞procedure␈α
returns.
␈↓Thus
␈↓ APPLY(proc,ARG_LIST(foo,bar,VALUE baz))
␈↓is roughly equivalent to
␈↓ tmplst←{{REF_ITEM(foo),REF_ITEM(bar),REF_ITEM(VALUE baz)}};
␈↓ APPLY(proc,tmplst);
␈↓ WHILE LENGTH(tmplst) DO DELETE(LOP(tmplst));
␈↓but␈α∂is␈α∞somewhat␈α∂easier␈α∂to␈α∞type.␈α∂ Note␈α∞that␈α∂the␈α∂reference␈α∞items␈α∂created␈α∞by␈α∂ARG_LIST␈α∂are␈α∞just
␈↓like␈α∞those␈α
created␈α∞by␈α∞REF_ITEM,␈α
except␈α∞that␈α∞they␈α
are␈α∞marked␈α
so␈α∞that␈α∞APPLY␈α
will␈α∞know␈α∞to␈α
kill
␈↓them.
␈↓␈↓ εB15␈↓ X
␈↓SAIL Addendum 1␈↓ πmMINOR CORRECTIONS TO AIM-204
␈↓␈↓ ¬↑␈↓↓SECTION 7␈↓
␈↓␈↓ β}␈↓↓MINOR CORRECTIONS TO AIM-204␈↓
␈↓βThis is a file of known SAIL manual defects (mainly typos) that
␈↓βare not already noted in the preface or covered by the "incremental"
␈↓βSAIL manual. It is primarily an internal document for the SAIL
␈↓βhackers, put is being provided here as a stopgap measure pending
␈↓βa full new edition for the manual. This list is, however, not
␈↓βcomplete in that it does not include a number of typos that do
␈↓βnot change the meaning. If, however, you discover any defects
␈↓βin the manual or in the update, please notify your friendly local
␈↓βSAIL representative.
␈↓β99R KVL The synonym for "SUCH THAT" is "|" and not "↓"
␈↓β32R KVL APPENDIX 5 has nothing to do with the
␈↓β bits for IO errors or mode enablings
␈↓β43L RHT FILEINFO documentation is a lie. You usually get:
␈↓β FILENAME
␈↓β EXT,,DATE
␈↓β prot(9)Mode(4)time(11)date(12)
␈↓β negative swapped word count (if did a lookup).
␈↓β 0 (unless you opened device in magic mode)
␈↓β 0
␈↓β The whole point is that what you get is the six words
␈↓β from the last lookup or enter. For details see the
␈↓β monitor manual.
␈↓β58R JRL if a designated bracketed triple is not found
␈↓β then bindit is returned and no error message is given
␈↓β33L JRL release now takes a second defaultable value integer
␈↓β argument, the close inhibit bits (see RELEAS in UUO
␈↓β manual). These are defaulted to zero when unspecified.
␈↓β72R KVL TELLALL does not do an implicit RESCHEDULE as the
␈↓β description implies -- it just sets the status of
␈↓β the concerned processes to "ready".
␈↓β102R RFS "33 through 36" S/B "33 through 35"
␈↓β105R RFS ". her are several" s/b " . There are several"
␈↓β79R,L KVL JOBTPC should be loaded with the location of a CALL to
␈↓β a non-simple procedure.
␈↓␈↓ εB16␈↓ X
␈↓SAIL Addendum 1␈↓ πmMINOR CORRECTIONS TO AIM-204
␈↓β92R JRL 20F will in future surround macro expansions with
␈↓β "<>" not "⊂⊃".
␈↓β38R RHT The description of INCHWL is wrong. Actually, the
␈↓β activation character is never included in the string
␈↓β and is always put into _SKIP_. (<crlf> puts a <cr>
␈↓β into _SKIP_ & throws away the <lf>).
␈↓β24L RHT The compiler will not in fact turn division by a power
␈↓β of two into an ASH.
␈↓β90L REG "... See section 19 about these [compilation errors] "
␈↓β should be section 20.
␈↓β90L REG 19.1.3 "boundary" is misspelled.
␈↓β41R RHT CVSIX left-justifies the sixbit value it builds.
␈↓β43L RHT In POINT, it is "a PDP-10 byte pointer".
␈↓β45R RHT FORC syntax should be "FORC <identifier> ← ... "
␈↓β57R RHT " ... methods of searching the associative store ..."
␈↓β had "store" missing before.
␈↓β105L RHT "omaname" should be "the symbolic name"
␈↓β110L RHT added reference:
␈↓β Harvey, Brian "Monitor Command Manual" SAILON 54.3
␈↓β (Dec 1973)
␈↓β Also, there is a more current SOS manual: SAILON 50.3
␈↓β76L RHT Should be "REF_ITEM(VALUE <expression>)"
␈↓␈↓ εB17␈↓ X